get host ip address asp.net core

45

get host ip address asp.net core -

var httpConnectionFeature = httpContext.Features.Get<IHttpConnectionFeature>();
var localIpAddress = httpConnectionFeature?.LocalIpAddress;

Comments

Submit
0 Comments